Open
Conversation
a5be134 to
cfd474c
Compare
c55830a to
c6f4be4
Compare
c6f4be4 to
8e8f83f
Compare
Contributor
Author
|
/retest |
hemslo
reviewed
Oct 9, 2025
Comment on lines
+132
to
+135
| repositories = {} | ||
| repo_permissions = robot_data.get("repositories", []) | ||
| for repo_perm in repo_permissions: | ||
| repositories[repo_perm["name"]] = repo_perm["role"] |
Contributor
There was a problem hiding this comment.
similar here, why not directly let robot_data returns dict name -> role?
| actions = [] | ||
|
|
||
| # Find robots to create | ||
| for key, desired in desired_state.items(): |
Contributor
There was a problem hiding this comment.
can use diff_mappings to diff
Comment on lines
+255
to
+265
| # Find robots to delete (robots in current state but not in desired state) | ||
| for key, current in current_state.items(): | ||
| if key not in desired_state: | ||
| actions.append( | ||
| RobotAccountAction( | ||
| action="delete", | ||
| robot_name=current.name, | ||
| org_name=current.org_name, | ||
| instance_name=current.instance_name, | ||
| ) | ||
| ) |
Contributor
There was a problem hiding this comment.
how about introduce delete: true on robot account so we only delete account marked as delete, no accidentally delete accounts not managed by this integration
chassing
reviewed
Oct 9, 2025
| actions = [] | ||
|
|
||
| # Find robots to create | ||
| for key, desired in desired_state.items(): |
44d5a34 to
7b13f24
Compare
ffe97e7 to
51bbceb
Compare
51bbceb to
457ed70
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: APPSRE-11883
This adds a new integration that handles robot account management.
I decided to go with this approach because
quay-permissionsintegration already has a complex state management that when mixed with the robot accounts needs of managing teams and repository relationships gets really messy.This approach also let's robot-accounts be more independent and clear to the user, since it relies on a single file where all relationships are defined.
Also I am getting inspiration from the original script where the robot accounts for quay are defined.
We still need to decide how are we going to migrate existent robot accounts to
app-interfaceand deal with the permissions needed byqontract-reconcileto managerobot-accountfor private teams and repos.In the current state, if you dry-run this integration locally it will show some delete actions for already defined robot accounts outside
app-interface.Also we don't heave full read access for robot-account in some of the Quay orgs defined in
app-interface.How to test this?
Create an integration file in
app-interface. Here is a snippet, you can copy other integrations file if you get validations errors and edit:Create a new
robot-account-1.ymlSet your local qontract-schemas to the branch on this PR
when you run
You should see a list of actions, the first one should be to create the robot account that we defined on the yaml file above.
Drop a comment if you have any question, issue or need help testing this.